// 接口地址统一管理
// 请求  登录\查询
import request from './request'
import qs from 'qs'
// 请求精品数据
export const JingpingApi = () => request.get('/products/recommend')
// 请求热门数据
export const RemenApi = () => request.get('/products/hot')
// 发起微信登录请求
export const weixinLoginApi = (params) => request.post('/wechatUsers/PCLogin',qs.stringify(params))
// 发送短信验证码
export const SendSMSAPI = (params) => request.post('/sendSMS',qs.stringify(params))
// 手机号验证码登录接口
export const PhoneReginAPI = (params) => request.post('/phoneRegin',qs.stringify(params))
// 手机号绑定接口
export const BindPhoneAPI = (params) => request.post('/wechatUsers/binding',qs.stringify(params))
// 获取用户信息
export const UserProfilesAPI = () => request.get('/shop/userProfiles')
// 获取商品详情
export const GoodDetailsAPI = (id) => request.get(`/products/${id}`)
// 加入到购物车
export const addtocardApi = (params) => request.post('/shop/carts/add',qs.stringify(params))
// 查询全部商品
export const SearchgoodsAPI = (params) => request.get('/products', {params}) //{params:params}
// 查看购物车
export const SeeshopcardAPI = () => request.get('/shop/carts')
// 购物车删除商品
export const ShopcardeleteAPI = (id) => request.delete(`/shop/carts?productIds=${id}`)

